package com.xc.c1

object cat {

  def main(args: Array[String]): Unit = {

    val cat = new Cat
    cat.name = "小花"
    cat.age = 1
    cat.color = "白"
    def f = s"car(${cat.name},${cat.age},${cat.color})"
    println("小猫 : " + cat.toString)
    println("小猫:" + f)
  }

  class Cat {
    var name: String = ""
    var age: Int = _
    var color: String = _
    override def toString = s"Cat($name, $age, $color)"
  }

}
